﻿<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
<%@ taglib uri="/struts-tags" prefix="s" %>
<%@ taglib uri="/fmt-tag" prefix="fmt" %>
<%@ taglib uri="/core-tag" prefix="c" %>
<%@ include file="head.jsp" %>
	<title>国内机票</title>
	<style type="text/css">
	table{font-size: 12px;}
	a {text-decoration: none;}
	#flt_list tr{border-bottom: solid 1px gray;}
	.head_title{padding: 8px 10px; height: 33px; text-align: left;}
	.head_title p{ font-size:12px; }
	.flt_results_price{
	display:block; width:91px;height:16px;text-decoration:none;	color:#D35714;	padding:5px 0px 5px 2px;	border:solid 1px #5F7999;	-moz-border-radius:6px;	-webkit-border-radius:6px;	-moz-box-shadow:2px 2px 2px #BDC8D5;	-webkit-box-shadow:2px 2px 2px #BDC8D5;	line-height:16px;	cursor: pointer;;}
	.flt_results_price span{font-size:12px; color:#000000; float:left;}
	.flt_results_price em{  width:40px; text-align: center;font-weight:bold; float: left;}
	.flt_results_table tr:nth-child(2n) td { background: #f2f2f2; }
	.flt_results_table tr td { padding: 3px 2px; border-bottom:1px solid #ccc; color:#D35714; }
	.flt_results_table tr td a { display:block; }
	.flt_results_table tr td:first-child { padding-left: 5px; }
	.flt_results_table tr td:first-child a { padding: 0 0 0 24px; }
	</style>
	</head>
	<body style="text-align: center;">
	<table cellpadding="0" cellspacing="0" class="head_title">
		<tr>
			<td>
				<h4 style="color: red">选择<c:if test="${searchPojo.voyagetype==2 && searchPojo.current==1}">去程</c:if>
<c:if test="${searchPojo.current==2}">返程</c:if>航班<span>
			<c:if test="${searchPojo.current==1}">
				${searchPojo.sdate} ${searchPojo.scityName}-${searchPojo.ecityName}
			</c:if>
			<c:if test="${searchPojo.current==2}">
				${searchPojo.secDate} ${searchPojo.ecityName}-${searchPojo.scityName}
			</c:if></span>
			</h4>
			</td>
		</tr>
		<tr>
			<td>共搜索到
			<s:if test="#request.flights.size>0">
				<s:property value="#request.flights.size"/>
			</s:if><s:else>0</s:else> 个航班</td>
		</tr>
	</table>
		<s:if test="#request.flights.size>0">
		<s:iterator value="#request.flights" var="flight" status="index">
			<table width="100%" style="text-align:center;border-bottom: solid 1px gray" class="flt_results_table" cellpadding="0" cellspacing="0">
			  <tr>
			    <td style="width: 90px;">
			    	<table cellpadding="0" cellspacing="0">
			    	<tr>
			    		<td style="border: none;">
			    			<img src="images/ComPic/${baseResponse.airLine}.gif" height="12" width="12">
			    		</td style="border: none;">
			    		<td style="text-align: left;border: none;">
			    			${baseResponse.flightNo}<br/>
<c:if test="${searchPojo.cabin=='B'}">经济舱</c:if><c:if test="${searchPojo.cabin=='Y'}">全价舱</c:if><c:if test="${searchPojo.cabin=='C'}">公务舱</c:if><c:if test="${searchPojo.cabin=='F'}">头等舱</c:if>/${cabins[0].cabin}
			    		</td>
			    	</tr>
			    	</table>
			    </td>
			    <td align="center">
			    	<div style="width: 60px;">
                      <c:if test="${searchPojo.current==1 }">
						${searchPojo.scityName}<br/>${searchPojo.ecityName }</td>
					</c:if>
					<c:if test="${searchPojo.current==2}">
							${searchPojo.ecityName}<br/>${searchPojo.scityName }
					</c:if>
                   </div>
			    </td>
			    <td align="center">
			    	<div style="width: 55px;">
                     ${baseResponse.stime}<br/>${baseResponse.etime}
                   </div>
			    </td>
			    <c:if test="${searchPojo.voyagetype==2&&searchPojo.current==1 }">
				    <td align="center" onclick="showSecond('${searchPojo.scity}_${searchPojo.ecity }','${searchPojo.sdate}_${baseResponse.stime}_${baseResponse.etime}','${baseResponse.flightNo}_${cabins[0].price}_${cabins[0].cabin}_${baseResponse.tax}')">
				    	<div style="width: 75px;text-align: left;" class="flt_results_price">
							<em>&yen;<fmt:formatNumber value="${cabins[0].price}" pattern="0" /></em>
							<span>
							<s:if test="cabins[0].discount!=null && cabins[0].discount<100">
							<fmt:formatNumber value="${cabins[0].discount/10}" />折
							</s:if><s:else>全价</s:else></span>
	                    </div>
				    </td>
			    </c:if>
			     <c:if test="${searchPojo.current==2 || searchPojo.voyagetype==1}">
			     	 <td align="center" onclick="chooseTrip('${searchPojo.scity}_${searchPojo.ecity }','${searchPojo.sdate}_${baseResponse.stime}_${baseResponse.etime}','${baseResponse.flightNo}_${cabins[0].price}_${cabins[0].cabin}_${baseResponse.tax}')">
				    	<div style="width: 75px;text-align: left;" class="flt_results_price">
							<em>&yen;<fmt:formatNumber value="${cabins[0].price}" pattern="0" /></em>
							<span>
							<s:if test="cabins[0].discount!=null && cabins[0].discount<100">
							<fmt:formatNumber value="${cabins[0].discount/10}" />折
							</s:if><s:else>全价</s:else></span>
	                    </div>
				    </td>
			     </c:if>
			  </tr>
			</table>
		</s:iterator>
	<script type="text/javascript">
		showSecond=function(oinfo,time,info){
			var sdate = ${searchPojo.sdate};
			var url = 'oinfo='+oinfo+'&time='+time+"&info="+info;
			location.href='./flight_showSecond.shtml?'+url;
		};
		
		chooseTrip=function(oinfo,time,info){
			var sdate = ${searchPojo.sdate};
			var url = 'oinfo='+oinfo+'&time='+time+"&info="+info;
			location.href='./flight_choseAirLine.shtml?'+url;
		};
	</script>
	</s:if>
	<s:else>
		<font>未找到匹配航班，请返回重新查找！ </font>
	</s:else>
	</body>
</html>
